/**
 * 严肃声明：
 * 开源版本请务必保留此注释头信息，若删除我方将保留所有法律责任追究！
 * 本系统已申请软件著作权，受国家版权局知识产权以及国家计算机软件著作权保护！
 * 可正常分享和学习源码，不得用于违法犯罪活动，违者必究！
 * Copyright (c) 2020 陈尼克 all rights reserved.
 * 版权所有，侵权必究！
 */

export default {
  addCart (state, payload) {
    state.cartCount = payload.count
  },
  trueHidden (state) {
    state.syHidden = true
  },
  falseHidden (state) {
    state.syHidden = false
  },
  setSessionToekn (state, payload) {
    state.sessionToekn = payload
  },
  setSearchUserCfgOne (state, payload) {
    state.searchUserCfg.one[payload] = 1
  },
  removeSearchUserCfgOne (state, payload) {
    state.searchUserCfg.one[payload] = 0
  },
  setSearchUserCfgMore (state, payload) {
    state.searchUserCfg.more[payload] = 1
  },
  removeSearchUserCfgMore (state, payload) {
    state.searchUserCfg.more[payload] = 0
  },
  toggleSearchUserCfgMore (state, payload) {
    state.searchUserCfg.more[payload] = state.searchUserCfg.more[payload] ? 0 : 1
  },
}
